

class Solution(object):
    def searchInsert(self, nums, target):
        """
        :type nums: List[int]
        :type target: int
        :rtype: int
        """
        i = 0
        if target in nums:
            i = nums.index(target)
        else:
            for n in nums:
                if n > target:
                    break
                else:
                    i += 1
        print(i)


if __name__ == '__main__':
    sol = Solution()
    sol.searchInsert([], 7)
